import axios from "axios";

/* 
    AuditList组件(审核列表)接口
*/
// 获取本用户审核列表
export function getAuditList(params) {
    return (
        axios({
            url: 'api/page/admin/pageInfo/queryPageList',
            method: 'post',
            params
        })
    )
}
// 提交文章接口，或者更新文章,或者发布文章
export function UploadArticle(data) {
    return (
        axios({
            method: "POST",
            url: 'api/page/admin/pageInfo/addPage',
            data
        })
    )
}
/* 
    Audit组件(审核文章)接口
*/
// 获取本用户审核列表
export function getAudit(params) {
    return (
        axios({
            url: 'api/page/admin/pageInfo/getNoAuditPageList',
            method: 'get',
            params
        })
    )
}
// 获取除了草稿箱的审核
export function getExcept(params) {
    return (
        axios({
            url: 'api/page/admin/pageInfo/queryPageList?publishStateList=0&publishStateList=2',
            method: 'post',
            params
        })
    )
}
// 审核文章通过或驳回
export function auditArticle(data) { 
    return (
        axios({
            method: "POST",
            url: 'api/page/admin/pageInfo/addPage',
            data
        })
    )
}